#

| Chapter 49 Working with Numbers |

## 49.8 It's Great to Have a Spreadsheet

sc | Calculators are very good, but nothing beats a spreadsheet when you have complicated calculations and want to explore, save, and print alternate computational scenarios. After years of waiting to see mainline spreadsheet programs ported to UNIX, I discovered sc.

Try it; you'll like it. Well, maybe not at first, but eventually. It's quite full featured, but has a slightly helter-skelter user interface with only barebones documentation to help you figure it out. Fortunately, there are built-in quick reference screens available by typing a question mark (`?`), so (especially if you already know how to use a spreadsheet), you can learn the basics pretty quickly.

A couple of pointers, though: pay attention to the prompts provided by some of the commands. For example, if they show an argument in quotes, that probably means you'd better type the quotes. (But not brackets - they indicate an optional argument.) Also, watch for the order of arguments. (For example, the range copy command takes the destination range first.)

One feature that may be helpful (or may make the interface even more obscure) is that cursor movement and cell editing commands are based on the vi (30.2) command set.

While you might wish for a point and click interface like Excel, or even the keystroke-based menus that make 1-2-3 so easy to use, sc has a lot to offer. It lets you do just about everything pricier spreadsheets do, including hiding rows or columns, symbolic range or cell names, and a full range of numeric, string, financial and date/time functions. It even lets you encrypt your spreadsheets for security.

Some functions are implemented by pipes (1.4) to UNIX commands. For example, there's no print command. Instead, you use one of the save commands (P to save the file in sc format; W to save an image of the screen), supplying a pipe to the printer as the "filename." Of course, this means that if you know the format of the output stream (which is fairly simple), you can use any available UNIX utilities to transform the data.

You can't pipe data into sc, but you can prepare data with other programs, and then use the supplied psc program to convert it to sc format.

- TOR

49.7 Total a Column with addup |  | 49.9 Business Graphics with ipl